{include file="public/nheader"}
<div class="layui-fluid layui-bg-white">
    <form action="{:url()}" class="layui-form layui-form-fixed">
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>提现金额(100元起提)
            </label>
            <div class="layui-input-block">
                <input type="text" name="money" required="" lay-verify="required" autocomplete="off" class="layui-input"
                    value="{$money|default='0'}"
                    placeholder="">(当前最高可提{$money|default='0'}元,手续费比例:{$fee|default='0.7'}%,此手续费由微信支付商户平台抽取)
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>提现银行
            </label>
            <div class="layui-input-block">
                <select name="bank">
                    <option value="中国银行">中国银行</option>
                    <option value="中国银行">网商银行(支付宝)</option>
                    <option value="中国工商银行">中国工商银行</option>
                    <option value="中国建设银行">中国建设银行</option>
                    <option value="中国农业银行">中国农业银行</option>
                    <option value="中国光大银行">中国光大银行</option>
                    <option value="中国民生银行">中国民生银行</option>
                    <option value="中国邮政储蓄银行">中国邮政储蓄银行</option>
                    <option value="中信银行">中信银行</option>
                    <option value="交通银行">交通银行</option>
                    <option value="华夏银行">华夏银行</option>
                    <option value="招商银行">招商银行</option>
                    <option value="兴业银行">兴业银行</option>
                    <option value="广发银行">广发银行</option>
                    <option value="平安银行">平安银行</option>
                    <option value="上海浦东发展银行">浦发银行</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>用户名
            </label>
            <div class="layui-input-block">
                <input type="text" name="name" required="" lay-verify="required" autocomplete="off" class="layui-input"
                    value="" placeholder="请填写用户名">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>银行卡号(账号)
            </label>
            <div class="layui-input-block">
                <input type="number" name="cards" required="" lay-verify="required" autocomplete="off"
                    class="layui-input" value="" placeholder="请填写收款账号">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>验证码
            </label>
            <div class="layui-input-block">
                <div class="layui-input-inline"><input type="number" name="smscode" id="smscode" lay-verify="smscode"
                        autocomplete="off" class="layui-input"></div>
                <div class="layui-input-inline">
                    <input type="button" class="layui-btn layui-btn-primary" id="btnSendCode" value="获取验证码">
                </div>
            </div>
        </div>
        <div class="layui-footer layui-form-item layui-center ">
            <button class="layui-btn" lay-filter="submitIframe" type="button" lay-submit>提交</button>
            <button class="layui-btn layui-btn-primary" type="button" sa-event="closeDialog">取消</button>
        </div>
    </form>
</div>
<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
{include file="public/nfooter"}
<script>
    $(function () {
        var wait = 60;
        function time(o) {
            if (wait == 0) {
                o.removeAttribute("disabled");
                o.value = "获取验证码";
                wait = 60;
            } else {
                o.setAttribute("disabled", true);
                o.value = "重新发送(" + wait + ")";
                wait--;
                setTimeout(function () {
                    time(o);
                }, 1000);
            }
        }

        $("#btnSendCode").click(function () {
            if (wait != 60) {
                alert("请" + wait + "秒后再试！");
                return;
            }
            time(this);
            $.getJSON("/agent/sendmess", {}, function (res) {
                if (res.code == 200) {
                    alert(res.msg);
                    return;
                } else {
                    wait = 3;
                    $("#btnSendCode").attr("disabled", false).addClass("layui-btn layui-btn-primary");
                    alert(res.msg);
                    return;
                }
            });
            return;
        });
    })
</script>